import createHeading from './heading.js'
import './main.css'
import image from './image.png'
import about from './about.md'
import editor from './editor.js'

const edit = editor()
document.body.append(edit)

const heading = createHeading()

document.body.append(heading)
console.log(123456454)
const img = new Image()
img.src = image
document.body.append(img)
console.log(about)
document.write(about)

let lastEditor = edit
module.hot.accept('./editor.js', () => {
  const val = lastEditor.value
  document.body.removeChild(edit)
  const newEditor = editor()
  newEditor.value = val
  document.body.appendChild(newEditor)
  lastEditor = newEditor
})

module.hot.decline('./heading.js')
